Skip to content

fix(deps): resolve 4 transitive security advisories failing Dependabot - #174

Merged
its-mash merged 2 commits into
mainfrom
fix/dependabot-security-overrides
Jun 18, 2026
Merged

fix(deps): resolve 4 transitive security advisories failing Dependabot#174
its-mash merged 2 commits into
mainfrom
fix/dependabot-security-overrides

Conversation

@its-mash

Copy link
Copy Markdown
Member

What & why

Four Dependabot security-update jobs keep failing with security_update_not_possible (example run). Each affected package is a transitive dependency, which Dependabot won't bump on its own — so the jobs error on every run.

This PR remediates all four at the appropriate level.

Advisory Pulled in by Fix needs Remediation
@opentelemetry/core <2.8.0 posthog-js → OTel exporter (parents pin core to exactly 2.2.0) 2.8.0 Bump posthog-js (removes subtree)
protobufjs <7.6.3 posthog-js → @opentelemetry/otlp-transformer 7.6.3 Bump posthog-js (removes subtree)
dompurify <3.4.9 monaco-editor@0.55.1 (pins exactly 3.2.7, latest monaco) + posthog-js 3.4.9 pnpm override → ^3.4.10
form-data <4.0.6 jsdom (dev-only, via vitest) 4.0.6 pnpm override → ^4.0.6

Two techniques, by necessity

  • dompurify / form-datapnpm.overrides. Their parents accept the patched version (monaco's exact 3.2.7 becomes an API-compatible same-major minor bump), so forcing the version is safe and surgical.
  • @opentelemetry/core / protobufjscould not safely override @opentelemetry/core: every OTel parent (sdk-trace-base, resources, otlp-transformer, sdk-metrics) pins it to exactly 2.2.0, and forcing 2.8.0 would create an untested OTel version mix (OTel pins exactly to avoid duplicate-instance bugs). Instead, posthog-js ≥ 1.387.0 dropped its OpenTelemetry exporter entirely, so bumping posthog-js (^1.351.4 → ^1.387.0, already within the existing caret range) removes both the OTel and protobufjs subtrees at the source. The app only uses posthog's stable top-level API (init/register/capture/opt_*), unaffected by the bump.

Changes

  • apps/desktop/package.json: posthog-js ^1.351.4 → ^1.387.0
  • package.json: add pnpm.overrides for dompurify and form-data
  • pnpm-lock.yaml: net −219 lines (unused OTel subtree removed)

Verification

  • pnpm why confirms @opentelemetry/core and protobufjs are gone; dompurify@3.4.10 and form-data@4.0.6 resolve everywhere.
  • pnpm typecheck · ✅ pnpm test:ts (200/200) · ✅ pnpm build:web · ✅ pre-commit hook (cargo fmt/clippy + eslint + tsc)

its-mash added 2 commits June 17, 2026 00:26
Dependabot's security updater cannot bump transitive deps on its own, so
four security-update jobs fail with `security_update_not_possible`. Fix
each at the appropriate level:

- @opentelemetry/core (<2.8.0) and protobufjs (<7.6.3): both pulled in
  ONLY via posthog-js' old @opentelemetry/exporter-logs-otlp-http. Their
  OTel parents pin @opentelemetry/core to exactly 2.2.0, so the core
  advisory is unfixable by override without an untested version mix.
  posthog-js >=1.387.0 drops the OpenTelemetry exporter entirely, so
  bumping posthog-js (^1.351.4 -> ^1.387.0, already in range) removes
  both subtrees at the source. App only uses posthog's stable top-level
  API (init/register/capture/opt_*), unaffected by the bump.

- dompurify (<3.4.9): pulled in by monaco-editor@0.55.1 (pins exactly
  3.2.7, the latest monaco) and posthog-js. Force ^3.4.10 via override;
  same-major minor bump, API-compatible.

- form-data (<4.0.6): dev-only, via jsdom (^4.0.0) used by vitest. Force
  ^4.0.6 via override; in range.

typecheck, the 200 TS tests, and the web build all pass.

Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
@its-mash
its-mash merged commit eb32289 into main Jun 18, 2026
3 checks passed
@its-mash
its-mash deleted the fix/dependabot-security-overrides branch June 18, 2026 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant